<style>
	.pageFormContent dl.nowrap, .nowrap dl{width:100%;}
	.pageFormContent dl.nowrap dd, .nowrap dd,.pageFormContent dt{width:auto;}
	.pageFormContent dt{ font-weight:bolder;}
</style>
<h2 class="contentTitle">查看订单详情</h2>
<div class="pageContent">
    <div class="pageFormContent" layouth="56" style="height: 290px; overflow: auto;">
        <fieldset>
            <legend>订单基础信息</legend>
            <p>
                <label>订单编号：</label>
                {$order['sn']}
            </p>
            <p>
                <label>订单时间：</label>
                {$order['add_time']|date='Y-m-d H:i:s',###}
            </p>
            <p>
                <label>修改时间：</label>
                {if $order['mtime']}{$order['mtime']|date='Y-m-d H:i:s',###}{else}-{/if}
            </p>
            <p>
                <label>支付时间：</label>
                {if $order['pay_time']}{$order['pay_time']|date='Y-m-d H:i:s',###}{else}-{/if}
            </p>
            <p>
                <label>发货时间：</label>
                {if $order['shipping_time']}{$order['shipping_time']|date='Y-m-d H:i:s',###}{else}-{/if}
            </p>
            <p>
                <label>平台：</label>
                {$order['platform']}
            </p>
            <p>
                <label>下单IP：</label>
                {$order['add_ip']}
            </p>
        </fieldset>
        <fieldset>
            <legend>订单状态</legend>
            <p>
                <label>订单状态：</label>
                <php>echo $status[$order['status']];</php>
            </p>
            <p>
                <label>支付状态：</label>
                <php>echo $pay_status[$order['pay_status']];</php>
            </p>
            <p>
                <label>配送状态：</label>
				<php>echo $shipping_status[$order['shipping_status']]</php>
            </p>
        </fieldset>
        <fieldset>
            <legend>收货信息</legend>
            <p>
                <label>收货人：</label>
				{$order['address']['consignee']}
            </p>
            <p>
                <label>收货地址：</label>
				{$Area[$order['address'][province]]['name']} - {$Area[$order['address'][city]]['name']} - {$Area[$order['address']['district']]['name']}&nbsp;{$order['address']['address']}
            </p>
            <p>
                <label>电话：</label>
				{$order['address']['tel']}
            </p>
            <p>
                <label>手机：</label>
				{$order['address']['mobile']}
            </p>
			 <p>
                <label>留言：</label>
				{$mage['beizhu']}
            </p>
        </fieldset>
        <fieldset>
            <legend>订单信息</legend>
            <div>
                <table class="table" width="98%" align="center">
                    <thead>
                    <tr align="center">
                        <th width="15%">商品编号</th>
                        <th>商品名称</th>
                        <th width="10%">单价</th>
                        <th width="10%">采购数量</th>
                        <th width="12%">CV</th>
                    </tr>
                    </thead>
                    <tbody>
                    <if condition="empty($order['goods'])">
                    <tr align="center">
                        <td colspan="5" style="padding:10px;border:0;color:#FB0000;" align="center">购物车为空!</td>
                    </tr>
                    <else/>
                    <volist name="order['goods']" id="vo">
                    <tr align="center">
                        <td height="30" style="border-left:none;"><a target="dialog" width="880" height="650" href="{:U('Content/show',array('id'=>$vo['product_id']))}">{$vo['product_psn']}</a></td>
                        <td>({$vo['product_id']}){$vo['product_name']}</td>
                        <td>{$vo['price']/100|number_format=###,2}</td>
                        <td>{$vo['number']}</td>
                        <td><span class="count_price" id="count_price_{$vo['product_id']}">{$vo['priceall']/100|number_format=###,2}</span></td>
                    </tr>
                    </volist>
                    </if>
                    <tbody>
                    </table>
                </div>
                </fieldset>
                <fieldset>
                    <legend>订单结算信息</legend>
                    <dl class="nowrap">
                        <dt>订单结算</dt>
                        <dd>订单总额:{$order['amount']/100|number_format=###,2} CV 
                            <br/>
                            <php>
                            $order_amount=$order['amount'];
                            </php>
                            <volist name="order['finance']" id="f">
                            {if $f['action']=='OOS'||$f['action']=='REFUND'}
                            <php>
                            	$order_amount-=$f['value']*$f['number'];
                            </php>
                            {/if}
                            {if $f['code'] == 'privilege'}
                            <php>
                            	$order_amount-=$f['value'];
                            </php>
                            {/if}
                            {if $f['action']=='OOS'||$f['action']=='REFUND'}
                            {$f['remark']} | 数量: {$f['number']} | 价格：{$f['value']/100||number_format=###,2} {$f['subject']} <br/>
                            {/if}
                            </volist>                            
                            <!-- <b style="font-size:16px;">小计：{$order_amount/100|number_format=###,2}</b>CV -->
                        </dd>
                    </dl>
                    <dl class="nowrap">
                    	<dt>优惠</dt>
                    	<dd>
                    		{if $mage['free']}<font color='green'>免邮</font>&nbsp;{/if}
                    		<volist name="coupondata" id="c">
                    			{if $c['type'] == 'USE'}
								折扣科目： {$c['subject']} |产品ID：{$c['goods_id']}| 类型: {$c['type']} | 金额：{$c['value']/100|number_format=###,2} | 优惠ID：<a href="{:U("Sales/index",array('listkey'=>'coupon','sfield'=>'all'))}" target="navTab" rel="Sales_ju_index"> {$c['content']}</a><br/>
								{else}
								折扣科目： {$c['subject']} |产品ID：{$c['goods_id']}| 类型: {$c['type']} | 金额：{$c['value']/100|number_format=###,2} | 说明： {$c['content']}<br/>
								{/if}
                            	
                            </volist>
                    	</dd>
                    </dl>
                    <dl class="nowrap">
                        <dt>应支付</dt>
                        <dd><b style="font-size:16px;">{$order_amount/100|number_format=###,2}</b>CV</dd>
                    </dl>
                    <dl class="nowrap">
                        <dt>操作记录</dt>
                        <dd>
                            <volist name="order['logs']" id="vo">
                            {$vo['open']}: {$vo['content']|nl2br}  --{$vo['user_id']} ({$vo['ctime']|date='Y-m-d H:i:s',###})
                            </volist>
                        </dd>
                    </dl>
                </fieldset>
            </div>
        </div>
